home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
sound
/
cmod312.zip
/
CAPAPLA2.ZIP
/
CAPAPLA2.DOC
< prev
next >
Wrap
Text File
|
1996-04-17
|
7KB
|
229 lines
* CapaPlay II 2.6b *
(c) Copyright 1993-1995 Heikki Ylinen (flap / Capacala)
CapaPlay II may freely be used in any production as long as
credits are given to its author Heikki Ylinen (flap / Capacala).
*************************** History of CapaPlay II ****************************
Date Version
12.11.1995 0.1b Original version.
MOD and S3M supported.
14.11.1995 0.2b Many bugs fixed and some effects changed
16.11.1995 0.3b Fixed bugs in loader
Optimized the instrument information memory usage
17.11.1995 0.4b Fixed a bug in row system
Some changes with sample playing routines
30.11.1995 0.5b Fixed a bug in S3M default panning
Fixed a bug in S3M effect converter
10.12.1995 0.6b First version of XM loader
(no envelopes nor autovibratos)
Fixed a period convert bug in MOD loader
Big changes in the main player routine
11.12.1995 0.7b Linear frequency table supported
Changes in frequency calculation system
14.12.1995 0.8b Fadeout supported
Autovibrato supported
Changes in volume calculation system
Fixed a bug in 16-bit sample load
17.12.1995 0.9b Volume and panning envelopes supported
Fixed a bug in portamento with linear frequency table
Fixed a bug in XM sample loader
Fixed a bug in 16-bit sample player
Fixed a bug in vibrato
19.12.1995 1.0b Fixed a bug in XM pattern loader
23.12.1995 1.1b Fixed a bug in XM portamento
Fixed a bug in sample mute
Fixed a bug in break pattern
Changes in the sample loader
if there isn't room for 16-bit sample, it'll be
converted into 8-bits
Fixed a bug in pattern delay
Fixed a bug in jump to loop
Added global jump to loop (for S3Ms)
Added effect set envelope position
Fixed a bug in envelopes
Fixed a bug in 16-bit sample loader
Added support for MOD-like delay note
8. 1.1996 1.2b Fixed a bug in module identifier
Only the used part of sample is now loaded to GUS
this fixes problems with some looping samples
15. 1.1996 1.3b Fixed a bug in key off with set volume
Fixed a bug in S3M Sxx effect repeat
21. 1.1996 1.4b Support for DMA transfer
Fixed a bug with sample loop length 0 (XMs)
Fixed a bug in volume envelope with samples above 6
5. 2.1996 1.5b Fixed a bug if only new sample is given (MODs)
Optimizes the channel usage with all modules
Fixes in DMA transfer
Fixed a bug in vibratos
especially with linear frequency table
Fixed a bug in tempo calculation
Fixed a bug in sample offset
6. 2.1996 1.6b Fixed an irritating bug in sample offset
7. 2.1996 1.7b Fixed a bug in finetunes (MODs and XMs)
11. 2.1996 1.8b Different tempo calculation for S3Ms
Fixed a bug in two-way loops
Fixed a bug in jump to position
Fixed a bug in tremor
Fixed a bug in CP_SetChannelPanning
19. 2.1996 1.9b If DMA or IRQ is set zero, CapaPlay doesn't use it
Added global volume independent main volume
Fixed a bug in volume column portamento
Fixed a bug in volume column vibrato
21. 2.1996 2.0b Fixed a bug in vibrato volume slide (MODs)
4. 3.1996 2.1b Inits channels above 14 with MODs
Fixed a bug in vibrato with parameter 00
6. 3.1996 2.2b Fixed a bug in set waveform effects
Fixed a bug in portamento volume slide (MODs)
All used memory is now freed if load not succesful
14. 3.1996 2.3b Fixed a bug in panning if UsedChannels < NumOfChannels
Better DMA initialization
Fixed a bug in sample offset (XMs)
3. 4.1996 2.4b Corrupted modules can be played
5. 4.1996 2.5b Fixed a division by zero bug in envelopes
17. 4.1996 2.6b Fixed a bug in S3Ms with empty patterns
Added $G+ to CAPAPLA2.PAS to make sure it works
************************** Some Info on CapaPlay II ***************************
The assembler part of CapaPlay II (CP2ASM.OBJ) is compiled in large model.
The code and data resides in the same segment.
Most of the commands are pretty obvious, but there are a few things that
require a little explanation.
* CP_GetIRQ(), CP_GetDMA() and CP_GetBasePort()
Value returned is the one determined by the ULTRASND envrionment variable
* CP_LoadModule(char *ModName,dword StartOffset,byte TransferMode) and
CP_LoadOnlyPatterns(char *ModName,dword StartOffset,byte TransferMode)
StartOffset - offset of module data in file
TransferMode - 1=DMA, 0=manual
Value returned is as follows:
0 No error
1 File not found
2 File read error
3 Out of memory
4 Unknown module format
5 Unknown module version
6 Corrupted module
If the module is corrupted, it can be played anyway.
* CP_StartModule(byte Amplification,byte DefaultPanning,byte TimerMode)
Amplificarion - 0..48 or 255=auto configure
TimerMode - 1=GUS IRQ, 0=system timer
* CP_GetModuleType()
Value returned is as follows: 1=MOD, 2=S3M, 3=XM
* CP_PlaySample(byte ChannelNum,int InstrumentNum,int SampleNum,byte Note,byte Octave)
ChannelNum must be above CP_GetNumOfUsedChannels and
CP_GetNumOfUsedChannels must be below 16 to use this command
* CP_GetChannelEffect(int ChannelNum)
Value returned is as follows:
00 Arpeggio 20 Tremor
01 Slide Up 21 Extra Fine Slide Up
02 Slide Down 22 Extra Fine Slide Down
03 Tone Portamento 23 Set Global Volume
04 Vibrato 24 Fine Vibrato
05 Tone Portamento + Volume Slide 25 Global Volume Slide
06 Vibrato + VolumeSlide 26 Set Envelope Position
07 Tremolo 27 -
08 Set Panning 28 -
09 Set Sample Offset 29 -
0A Volume Slide 2A -
0B Position Jump 2B -
0C Set Volume 2C -
0D Pattern Break 2D -
0E Set Tempo 2E -
0F Set Speed 2F -
10 x Set Filter 30 -
11 Fine Slide Up 31 -
12 Fine Slide Down 32 -
13 Glissando Control 33 -
14 Set Vibrato Waveform 34 -
15 Set Fine Tune 35 -
16 1) Jump to Loop 36 -
17 Set Tremolo Waveform 37 -
18 Panning Slide 38 -
19 Retrig Note 39 -
1A Fine Volume Slide Up 3A -
1B Fine Volume Slide Down 3B -
1C Cut Note 3C -
1D 2) Delay Note 3D -
1E Delay Pattern 3E -
1F x Invert Loop 3F -
40-7F -
x = not supported
1) If bit 7 of effect parameters is set, jump to loop is handled as channel
independent (S3Ms)
2) If bit 7 of effect parameters is set, new volume for channel will be set
immediately (MODs)
* A simple pseudocode example of CapaPlay II usage
CP_SetIRQ(CP_GetIRQ)
CP_SetDMA(CP_GetDMA)
CP_SetBasePort(CP_GetBasePort)
CP_LoadModule('module.mod',0,1)
CP_StartModule(255,36,1)
<wait until key pressed>
CP_StopModule
CP_FreeModule
* Note to Turbo Pascal users
Remember to set the heap size to 0 with {$M <stacksize>,0,0}. CapaPlay II
cannot use the heap. If you however need some heap, make sure that there is
enough memory for the module outside the heap.